package com.gulimall.auth.server;

import com.thebeastshop.forest.springboot.annotation.ForestScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession;

/**
 * Spring-Session核心原理
 * 1、@EnableRedisHttpSession导入了RedisHttpSessionConfiguration.class配置
 *      1、给容器中添加了一个组件
 *      SessionRepository->[RedisOperationsSessionRepository]->：redis操作session的CRUD类
 *      2、SessionRepositoryFilter==》Filter：session存储过滤器，每个请求过来都需要经过filter
 */

@EnableDiscoveryClient
@EnableFeignClients
@SpringBootApplication
@ForestScan("com.gulimall.auth.server.client")
@EnableRedisHttpSession
public class GulimallAuthServerApplication {

    public static void main(String[] args) {
        SpringApplication.run(GulimallAuthServerApplication.class, args);
    }

}
